#pragma once
#include "seVisibleGameObject.h"

class seGameObjectManager
{
public:
	seGameObjectManager();
	~seGameObjectManager();

	void Add(int name, seVisibleGameObject* gameObject);
	void Remove(int name);
	int GetObjectCount() const;
	seVisibleGameObject* Get(int name) const;

	void DrawAll(sf::RenderWindow &renderWindow);
	void UpdateAll();

private:
	std::map<int, seVisibleGameObject*> _gameObjects;

	struct GameObjectDeallocator
	{
		void operator() (const std::pair<int, seVisibleGameObject*> &p) const
		{
			delete p.second;
		}
	};
};